<template>
	<view class="wrap">
		<u-navbar zIndex="100" title="本地图片列表" :titleBold="true"></u-navbar>
		<view class="log" v-for="item in list">
			<image class="img" :src="item.path" mode="aspectFill"></image>
			<view>
				<view class="u-font-20">
					{{item.url}}
				</view>
				<view class="u-font-20">
					{{item.path}}
				</view>
			</view>
		</view>
		<view class="u-p-30 u-text-center" @tap="load">
			<text class="u-font-36">点击加载</text>
		</view>
	</view>
</template>

<script>
	import {queryAll} from "@/services/mediaService.js"
	export default {
		data() {
			return {
				list:[],
			};
		},
		onLoad() {
			
		},
		methods:{
			async load(){
				const list = await queryAll()
				this.list = list
			}
		}
	}
</script>

<style lang="scss" scoped>
	.log{
		display: flex;
		align-items: center;
		.img{
			width: 100rpx;
			height: 100rpx;
			margin-right: 10rpx;
			flex-shrink: 0;
		}
	}
</style>
